package ${packInfo.ServiceImpl};

import ${packInfo.Entity}.${entity};
import ${packInfo.Mapper}.${table.mapperName};
<#if generateService>
import ${packInfo.Service}.${table.serviceName};
</#if>
import org.springframework.stereotype.Service;
import cn.superchart.common.base.BaseServiceImpl;
import ${packInfo.Parent}.param.*;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
/**
 * <p>
 * ${table.comment!} 服务实现类
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
@Service
<#if kotlin>
open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>()<#if generateService>, ${table.serviceName}</#if> {

}
<#else>
@Slf4j
public class ${table.serviceImplName} extends  BaseServiceImpl<${entity}, ${entity}Mapper> <#if generateService> implements ${table.serviceName}</#if> {



         @Transactional(rollbackFor = Exception.class)
         @Override
         public void add(${entity}AddParam ${lowEntity}AddParam) {
            String pk = super.saveData(${lowEntity}AddParam);
            log.info(pk);
         }

         @Transactional(rollbackFor = Exception.class)
         @Override
         public void edit(${entity}EditParam ${lowEntity}EditParam) {
            super.updateData(${lowEntity}EditParam);
         }

         @Override
         public ${entity}DetailParam detail(String id) {
             return queryData(id,${entity}DetailParam.class);
         }

         @Override
         public Page<${entity}DetailParam> page(${entity}PageParam ${lowEntity}PageParam) {
             return super.page(${lowEntity}PageParam,${entity}DetailParam.class);
         }



 }
</#if>
